<template>
  <web-view
    :src="
      'https://www.77d.cn/ciff/live/video.html?id=' +
      id +
      '&token=' +
      token
    "
  ></web-view>
</template>

<script>
import { getLiveUrl, getLiveInfo } from "../../api/api";
export default {
  data() {
    return {
      id: "", //当前直播间id
      liveInfo: {},
      token: "",
    };
  },
  async onLoad({ id }) {
    this.id = id;
    this.token = uni.getStorageSync("userInfo").token || "";
    console.log('https://www.77d.cn/ciff/live/video.html?id=' +this.id +'&token=' +this.token);
    let info = await getLiveInfo(id);
    if (info[1].data.code == "000000") {
      this.liveInfo = info[1].data.data;
    }
    console.log(info);
  },
  onShareAppMessage(res) {
    return {
      title: this.liveInfo.shareTitle,
      path: "/pages/live/live?id=" + this.id,
      imageUrl: this.liveInfo.shareImage,
      // desc: this.evaluateState.shareSummary,
    };
  },
};
</script>

<style lang="scss" scoped></style>
